<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<%@page import="model.UserDTO"  %>
<%@page import="bizlogic.UserManager"  %>
<%@page import="java.util.*" %>
<%
       
		UserDTO user = (UserDTO)session.getAttribute("user");
  		
       if(user == null){
    	   response.sendRedirect("/LeaveApplication/welcome.jsp");
    	   System.out.print("coming 1");
       }
       else if(!user.getPosition().getRole().equalsIgnoreCase("Admin")){
      	 	response.sendRedirect("/LeaveApplication/welcome.jsp");
      	 	System.out.print("coming 2");
       }
       else
       {
    	   
       }
%>
</head>
<body>

<p align="center"><%=user.getName() %></p><br/>
 <table align="center">

			<th> Admin Panel</th>
		 <tr><td><a href="/LeaveApplication/admin/useredit">EDIT USERS</a></td>	</tr>
		 <tr><td><a href="/LeaveApplication/admin/position">EDIT POSITION</a></td>	</tr>
		 <tr><td><a href="/LeaveApplication/admin/publicholiday">EDIT PUBLIC HOLIDAYS</a></td></tr>
		 <tr><td><a href="/LeaveApplication/admin/leavetype">EDIT LEAVE TYPES</a></td></tr>


</table>

</body>
</html>